import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import gwc from '@/components/gwc'
import myself from '@/components/myself'
import product from '@/components/product'
import collect from '@/components/collect'
import orderchecked from '@/components/orderchecked'
import order from '@/components/order'
import address from '@/components/address'
import payFail from '@/components/payFail'
import paySuccess from '@/components/paySuccess'
import addressnew from '@/components/addressnew'
import viewOrder from '@/components/viewOrder'
import search from '@/components/search'
import page404 from '@/components/404'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/search',
      name: 'search',
      component: search
    },
    {
      path: '/gwc',
      name: 'gwc',
      component: gwc
    },
    {
      path: '/myself',
      name: 'myself',
      component: myself
    },
    {
      path: '/product/:id',
      name: 'product',
      component: product
    },
    {
      path: '/collect',
      name: 'collect',
      component: collect
    },
    {
      path: '/orderchecked',
      name: 'orderchecked',
      component: orderchecked
    },
    {
      path: '/order/:id',
      name: 'order',
      component: order
    },
    {
      path: '/address',
      name: 'address',
      component: address
    },
    {
      path: '/payFail',
      name: 'payFail',
      component: payFail
    },
    {
      path: '/paySuccess',
      name: 'paySuccess',
      component: paySuccess
    },
    {
      path: '/viewOrder',
      name: 'viewOrder',
      component: viewOrder
    },
    {
      path: '/addressnew/:id',
      name: 'addressnew',
      component: addressnew
    },
    {
      path: '*',
      name: '404',
      component: page404
    }
  ]
})
